package com.cloud.lan.api;

import com.cloud.lan.api.dto.req.BaseReq;
import com.cloud.lan.api.dto.req.LanUserPraiseReq;
import com.cloud.lan.entity.base.BaseResponse;
import com.cloud.lan.service.ILanUserPraiseService;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import lombok.extern.slf4j.Slf4j;

/**
 * 用户点赞 入口
 * @author ErKang
 * @date Created in 2021/12/5 04:24
 * @title TestApi.java
 * Department: Product development
 */
@Slf4j
@RestController
@RequestMapping(value = {"/v1/user/praise/"}, method = {RequestMethod.GET, RequestMethod.POST}, consumes = {"*/*"}, produces = {"application/json"})
public class LanUserPraiseApi {

    @Resource
    ILanUserPraiseService lanUserPraiseService;

    @RequestMapping("usPraise")
    public BaseResponse<Object> usPraise(@RequestHeader(BaseReq.ut) String token, @RequestBody LanUserPraiseReq req) {
        req.setToken(token);
        return lanUserPraiseService.usPraise(req);
    }

}
